package tothreedesignmodel.composite;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author lzhphantom
 * @description
 * @date 创建于 18:02 2020/8/1
 * @modified
 */
@Data
@AllArgsConstructor
public class Leaf implements Component {
    private String name;

    @Override
    public void add(Component c) {

    }

    @Override
    public void remove(Component c) {

    }

    @Override
    public Component getChild(int i) {
        return null;
    }

    @Override
    public void operation() {
        System.out.println("Leaf[" + getName() + "]");
    }
}
